<ui:composition template="/dynamic/layout/layout.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="content">

		<div id="welcome">
			<p style="clear: both" />
		</div>
		<h3>Plik</h3>
		<h:form id="fileForm">

			<table class="showTable">
				<tr>
					<td><label>Nazwa:</label></td>
					<td><p>
							<h:outputText id="name" label="Nazwa"
								value="#{fileMBean.actualFile.filename}"
								styleClass="login_input_long">
							</h:outputText>
						</p></td>
				</tr>
				<tr>
					<td><label>Data dodania pliku:</label></td>
					<td><p>
							<h:outputText value="#{fileMBean.actualFile.creationDate}">
								<f:convertDateTime pattern="dd/MM/yyyy" />
							</h:outputText>
						</p></td>
				</tr>
				<tr>
					<td><label>Opis:</label></td>
					<td><p>
							<h:outputText id="description" styleClass="login_input_long"
								value="#{fileMBean.actualFile.fileDescription}">

							</h:outputText>
						</p></td>
				</tr>
				<tr>
					<td><label>Dodał:</label></td>
					<td><p>
							<h:outputText id="addedBy" styleClass="login_input_long"
								value="#{fileMBean.actualFile.createUser.username}">

							</h:outputText>
						</p></td>
				</tr>
				<tr>
					<td><label>Rozmiar:</label></td>
					<td><p>
							<h:outputText id="size" styleClass="login_input_long"
								value="#{fileMBean.actualFile.size}">

							</h:outputText>
						</p></td>
				</tr>
				<tr>
					<td><label>Typ pliku:</label></td>
					<td><p>
							<h:outputText id="type" styleClass="login_input_long"
								value="#{fileMBean.actualFile.fileType.type}">

							</h:outputText>
						</p></td>
				</tr>
				<tr>
					<td><label>Grupa:</label></td>
					<td><p>
							<h:outputText id="group" styleClass="login_input_long"
								value="#{fileMBean.actualFile.dgroup.name}">

							</h:outputText>
						</p></td>
				</tr>
				<tr>
					<td><label>Uczelnia:</label></td>
					<td><p>
							<h:outputText id="school" styleClass="login_input_long"
								value="#{fileMBean.actualFile.dgroup.department.school.name}">

							</h:outputText>
						</p></td>
				</tr>
				<tr>
					<td><label>Wydział:</label></td>
					<td><p>
							<h:outputText id="department" styleClass="login_input_long"
								value="#{fileMBean.actualFile.dgroup.department.name}">

							</h:outputText>
						</p></td>
				</tr>
			</table>
			<p:commandLink title="Pobierz" action="#{fileMBean.downloadFile}"
				ajax="false">
				<img
					src="${facesContext.externalContext.requestContextPath}/static/images/pobierz.PNG"
					alt="Pobierz" />
				<f:param value="#{fileMBean.actualFile.idFile}" name="fileId" />
			</p:commandLink>
		</h:form>


		<div id="main_content"></div>

	</ui:define>
</ui:composition>